﻿using System;

namespace fanxing
{
    internal class Program
    {
        public static void Main(string[] args)
        {
            int a = 10;
            Show(a);

            string str = "hello world";
            Show(str);

            Console.ReadKey();
        }


        /// <summary>
        /// 泛型方法，注意泛型参数，
        /// 解决的问题，是用一个方法满足不同的参数类型的功能
        /// </summary>
        /// <param name="param"></param>
        /// <typeparam name="T"></typeparam>
        public static void Show<T>(T param)
        {
            Console.WriteLine("{0},{1},{2}",typeof(Program),param.GetType().Name,param);
        }
    }
}